<?php 
class CHomeController extends CController{

	public function __construct() {
		parent::__construct();
		return true;
	}
	
	public function initialize() {
		parent::initialize();
		return true;
	}
	
	public function execute() {
	
		switch( $this->m_strAction ) {
			case NULL:
			
			case 'register':
				$this->handleRegister();
				break;
			
			default:
				// Empty default case
				
		}
	}
	
	public function handleViewSlider() {	
		$this->displaySlider();
	}
	
	public function handleRegister() {
		
		$objUser = new CUser();
		$objUser->setLoginName( 'giridhar' );
		$objUser->setPassword( md5( '123456' ) ); 
		$objUser->setOriginalPassword( strrev( '123456' ) ); 
		$objUser->setFirstName( 'Giri' ); 	
		$objUser->setLastName( 'Borke' ); 
		$objUser->setEmail( 'girishborke@gmail.com' );	
		$objUser->setAltEmail( 'giridharborke@hotmail.com' ); 	
		$objUser->setBirthDate( '1984-06-09' );	
		$objUser->setGender( 'Male' );
		$objUser->setMobileNo( '9874561235' );
		$objUser->setAddress1( 'Bhosari' );	
		$objUser->setAddress2( 'Pune' );	
		$objUser->setZipcode( '411039' );	
		$objUser->setWebsite( 'giridharborke@gmail.com' );	
		$objUser->setCountryId( 20 );	
		$objUser->setStateId( 452 ); 	
		$objUser->setCityId( 5112 );	
		$objUser->setUserTypeId( 3 );		
		$objUser->insert( $this->m_objDatabase ); 
	}
	
	public function displaySlider() {
	
		display( 'Hey' );
	
	}

}
?>